Output Style

Table 2 summarizes the output style parameters. Again, it is a list of <specifier, attribute> pairs. In the default column, `\n' and `\t' denote a new line and a tab, respectively. These parameters can be further divided into the following groups:


Table: Output style parameters.
specifier attribute default meaning
preamble string "\\begin{theindex}\n" index preamble
postamble string "\n\n\\end{theindex}\n" index postamble
setpage_prefix string "\n \\setcounter{page}{" page setting command prefix
setpage_suffix string "}\n" page setting command suffix
group_skip string "\n\n \\indexspace\n" intergroup vertical space
lethead_prefix string "" new letter heading prefix
lethead_suffix string "" new letter heading suffix
lethead_flag number 0 flag designating new letter
item_0 string "\n \\item " level 0 item separator
item_1 string "\n \\subitem " level 1 item separator
item_2 string "\n \\subsubitem " level 2 item separator
item_01 string "\n \\subitem " levels 0/1 separator
item_x1 string "\n \\subitem " levels x/1 separator
item_12 string "\n \\subsubitem " levels 1/2 separator
item_x2 string "\n \\subsubitem " levels x/2 separator
delim_0 string ", " level 0 key/page delimiter
delim_1 string ", " level 1 key/page delimiter
delim_2 string ", " level 2 key/page delimiter
delim_n string ", " inter page number delimiter
delim_r string "--" page range designator
encap_prefix string "\\" page encapsulator prefix
encap_infix string "{" page encapsulator infix
encap_suffix string "}". page encapsulator suffix
page_precedence string "rnaRA" page type precedence
line_max number 72 maximum line length
indent_space string "\t\t" indentation for wrapped lines
indent_length number 16 length of indentation


Context. Together, preamble and postamble define the context in which the index is to be formatted.

Starting Page. The starting page number can either be supplied by the user or retrieved automatically from the document transcript. In either case, this number can be enclosed with setpage_prefix and setpage_suffix to yield a page number initializing command.

New Group/Letter. The string bound to group_skip denotes the extra vertical space needed when a group is started. For a group beginning with a different letter, the parameters lethead_prefix and lethead_suffix (both with a default nil string) denote the group heading. The flag lethead_flag has a default value of 0, which means other than group_skip nothing else will be inserted before the group. On the other hand, if this flag is positive, the strings bound to lethead_prefix and lethead_suffix will be inserted with an instance of the new letter in uppercase in between. Similarly, a lowercase letter will be inserted if the flag is negative.

Entry Separators. This group includes everything with the item_ prefix. First, item_i denotes the command and indentation to be inserted when a key is started from a level greater than or equal to i. Second, item_ij has a similar meaning, but with i = j - 1. Finally, the two item_xj's are included to handle the situation where the parent level has no page numbers. Some styles require cases like these to be different from those with page numbers.

Table 2 depicts a system that supports three levels of subindexing. In general, suppose n is the number of index levels supported, there will be n item_i's ( 0≤in - 1), (n - 1) item_ij's ( 1≤jn - 1, i = j - 1), and (n - 1) item_xj's ( 1≤jn - 1).

Page Delimiters. Each level has a key/page delimiter that defines what is to be inserted between a key and its first page number. The inter-page delimiter is specified by delim_n, while the range designator is given by delim_r.

Page Encapsulator. The attributes of encap_prefix, encap_infix, and encap_suffix form what is to be placed into the output when an encapsulator is specified for a certain entry. Suppose foo is the specified encapsulator and N is the page number, the output sequence is

	     encap_prefix  foo  encap_infix  N  encap_suffix

Page Precedence. Five different types of numerals are supported by most systems for page numbering. These are lowercase roman (r), numeric or arabic (n), lowercase alphabetic (a), uppercase roman (R), and uppercase alphabetic (A). The string bound to page_precedence (default "rnaRA") specifies their order.

Line Wrapping. In the output index file, the merged list of page numbers can be wrapped in multiple lines, if it is longer than line_max. The newly wrapped line is indented by indent_space whose length is indent_length. This artificial line wrapping does not make any difference in formatting, but does provide increased readability for the pre-formatted final index. This feature may seem somewhat trivial at first glance, but if no formatters are involved whatsoever, the readability of the verbatim output index is important.